package com.cqu.hospitalsystem.schedule;

import com.cqu.hospitalsystem.service.AdminService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class BackupScheduler {

    @Resource
    private final AdminService adminService;

    public BackupScheduler(AdminService adminService) {
        this.adminService = adminService;
    }

//    @Scheduled(cron = "0 0 0 * * ?") // 每天凌晨执行
//    public void scheduleDatabaseBackup() {
//        adminService.backupDB();
//    }
}